dojo.provide("dojox.image.EditorImageDialog");
dojo.experimental("dojox.image.EditorImageDialog");

dojo.require("dijit._editor.plugins.LinkDialog");
dojo.require("dijit.layout.ContentPane");
dojo.require("dijit.layout.TabContainer");
dojo.require("dojox.image.ThumbnailPicker");

dojo.declare("dojox.image.EditorImageDialog",
	dijit._editor.plugins.LinkDialog,
	{
		_initButton: function(props){
			props = dojo.mixin({
//				showLabel: true,
//				iconClass: "",
				dropDown: this.dropDown,
				tabIndex: "-1",
				parseWidgets: true
			}, props || {});
			this.inherited(arguments);
		},

		_setContent: function(staticPanel){
			this.dropDown.setContent("<div dojoType='dijit.layout.TabContainer' id='abc' style='width: 600px; height: 320px;'><div id='tab1' dojoType='dijit.layout.ContentPane' title='Image Properties'>"+staticPanel+"</div><div id='tab2' dojoType='dijit.layout.ContentPane' title='Image Gallery'>	<div dojoType='dojox.image.ThumbnailPicker' size='500' useHyperlink='true' ></div></div>");
//			this.dropDown.startup();

		}
	}
);

dojo.subscribe(dijit._scopeName + ".Editor.getPlugin",null,function(o){
	if(o.plugin){ return; }
	switch(o.args.name){
	case "ImageDialog":
		o.plugin = new dojox.image.EditorImageDialog({command: "insertImage"});
	}
});
